//---------------------------------------------------------------------------

#ifndef GlassesFirmsH
#define GlassesFirmsH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Db.hpp>
#include <DBTables.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include "GlassesBridge.h"
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
#include <DB.hpp>

//---------------------------------------------------------------------------
class TfrmGlassesFirms : public TForm
{
__published:	// IDE-managed Components
        TDataSource *srcModels;
        TTable *tblModels;
        TDataSource *srcFirms;
        TTable *tblFirms;
        TPanel *pnlMain;
        TToolBar *ToolBar1;
        TToolButton *btnUpdate;
        TToolButton *btnAdd;
        TToolButton *btnDelete;
        TDBGrid *grdGlassesFirms;
        TLabel *lblFirm;
        TLabel *lblName;
        TDBGrid *grdModels;
        TBitBtn *btnClose;
        TBitBtn *btnHelp;
        void __fastcall FormDestroy(TObject *Sender);
        void __fastcall btnUpdateClick(TObject *Sender);
        void __fastcall btnAddClick(TObject *Sender);
        void __fastcall FormShow(TObject *Sender);
        void __fastcall btnDeleteClick(TObject *Sender);
        void __fastcall srcFirmsDataChange(TObject *Sender, TField *Field);
        void __fastcall btnCloseClick(TObject *Sender);
        void __fastcall grdGlassesFirmsKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
private:	// User declarations
        TDatabase * dbsMain;
        TGlassesBridge * bridge;

        void SetButtonsState();
public:		// User declarations
        __fastcall TfrmGlassesFirms(TComponent* Owner, TDatabase * dbMain);
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmGlassesFirms *frmGlassesFirms;
//---------------------------------------------------------------------------
#endif
